﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class admin_manageAboutUs : System.Web.UI.Page
{
    db_aboutUs aboutus = new db_aboutUs();
    protected void Page_Load(object sender, EventArgs e)
    {
        Server.Execute("inc/checkPurview.aspx");  // 此处用户权限验证
        if (!IsPostBack)
        {
            DataSet ds = aboutus.selectAboutUs();
            if (ds.Tables[0].Rows.Count != 0)
            {
                tb_info.Text = ds.Tables[0].Rows[0][1].ToString();
            }
        }
    }
    protected void btn_ok_Click(object sender, EventArgs e)
    {
        if (aboutus.updateAboutUs(tb_info.Text))
        {
            Response.Write("<script language=javascript>alert('更新成功！');</script>");
        }
        else
        {
            Response.Write("<script language=javascript>alert('失败！');</script>");
        }
    }
}